package com.zenchn.entity;


import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * HttpDataResult : Response HttpDataResult for RESTful,封装返回JSON格式的数据
 *
 * @author dingxinfa
 * @date 2018-07-07
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value="数据响应的结果对象",description="数据响应的结果对象")
public class HttpDataResult<T> extends HttpResult {

    private static final long serialVersionUID = 7025946367503011730L;
    /**
     * 数据
     */
    @ApiModelProperty(value="数据对象")
    private T data;

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public HttpDataResult() {
        super();
    }

    public HttpDataResult(String path) {
        super.setPath(path);
    }

    public HttpDataResult(String path,T data) {
        super.setPath(path);
        this.data = data;
    }
}